/**
 * 核心路由
 * 不需要校验必须存在的路由
 */

import type { RouteRecordRaw } from 'vue-router'
import BasicLayout from '@/layout/index.vue'
import { HOME_PATH } from '@/constants/router'

const fallbackNotFound: RouteRecordRaw = {
    path: '/:path(.*)*',
    name: 'FallbackNotFound',
    component: () => import('@/views/authentication/404.vue'),
    meta: {
        title: '404',
    },
}
// 配置不需要校验的路由
const coreRoutes: RouteRecordRaw[] = [
    {
        path: '/',
        name: 'BasicLayout',
        component: BasicLayout,
        redirect: HOME_PATH,
        children: [],
    },
    {
        path: '/login',
        name: 'AccessLogin',
        component: () => import('@/views/authentication/login.vue'),
        meta: {
            title: '用户登录',
        },
    },
]
export { coreRoutes, fallbackNotFound }
